package com.ruoyi.factorydata.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.*;

/**
 * 报工记录对象 work_report
 *
 * @author ruoyi
 * @date 2025-07-28
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(resultMap = "com.ruoyi.factorydata.mapper.WorkReportMapper.WorkReportResult")
public class WorkReport extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 项目id
     */
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 项目编码
     */
    @Excel(name = "项目编码")
    private String projectCode;

    /**
     * 生产项目产品id
     */
    @Excel(name = "生产项目产品id")
    private Long projectProductionId;
    @Excel(name = "产品id")
    private Long materialId;

    /**
     * 产品编码
     */
    @Excel(name = "产品编码")
    private String materialCode;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String materialName;

    /**
     * 产品类型
     */
    @Excel(name = "产品类型")
    private String materialType;

    /**
     * 产品规格
     */
    @Excel(name = "产品规格")
    private String materialSpecification;

    /**
     * 计量单位id
     */
    @Excel(name = "计量单位id")
    private Long materialUnit;

    /**
     * 计量单位名称
     */
    @Excel(name = "计量单位名称")
    private String materialUnitName;

    /**
     * 计划产量
     */
    @Excel(name = "计划产量")
    private Long expectedQuantity;

    /**
     * 计划id
     */
    @Excel(name = "计划id")
    private Long planId;

    /**
     * 计划编号
     */
    @Excel(name = "计划编号")
    private String planCode;

    /**
     * 设备id
     */
    @Excel(name = "设备id")
    private Long equipmentId;

    @TableField(exist = false)
    @Excel(name = "设备名称")
    private String equipmentName;

    /**
     * 设备编码
     */
    @TableField(exist = false)
    @Excel(name = "设备编码")
    private String equipmentCode;

    /**
     * 工位id
     */
    @Excel(name = "工位id")
    private Long stationId;

    @TableField(exist = false)
    @Excel(name = "工位名称")
    private String stationName;

    /**
     * 技术参数
     */
    @Excel(name = "技术参数")
    private String technicalParameter;

    @Excel(name = "技术参数图片")
    private String technicalParameterImages;

    /**
     * 工单id
     */
    private Long workOrderId;

    /**
     * 工单编号
     */
    @Excel(name = "工单编号")
    private String workOrderCode;
    /**
     * 当前工序id
     */
    @Excel(name = "当前工序id")
    private Long nowProcessId;

    /**
     * 当前工序编码
     */
    @Excel(name = "当前工序编码")
    private String nowProcessCode;

    /**
     * 当前工序名称
     */
    @Excel(name = "当前工序名称")
    private String nowProcessName;
    /**
     * 当前工序类型
     */
    @Excel(name = "当前工序类型")
    private String nowProcessType;
    /**
     * 当前工序类型
     */
    @Excel(name = "当前工序类型")
    private Integer nowProcessStep;
    /**
     * 实际产量,可报数量
     */
    @Excel(name = "实际产量")
    private Integer productionQuantity;
    /**
     * 报废数量
     */
    @Excel(name = "报废数量")
    private Integer scrapQuantity;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic(value = "0", delval = "2")
    private String delFlag;

    /**
     * 版本号
     */
    @Version
    private Long version;


    /**
     * 生产线id
     */
    @TableField(exist = false)
    @Excel(name = "生产线id")
    private Long productionLineId;

    /**
     * 生产线名称
     */
    @TableField(exist = false)
    @Excel(name = "生产线名称")
    private String productionLineName;

    /**
     * 批次编号
     */
    @TableField(exist = false)
    @Excel(name = "批次编号")
    private String batchNum;

    /**
     * 创建人名称
     */
    @TableField(exist = false)
    private String createByName;

    /**
     * 报工开始时间
     */
    @TableField(exist = false)
    private String reportTimeStart;

    /**
     * 报工结束时间
     */
    @TableField(exist = false)
    private String reportTimeEnd;

}